package com.example.websocket.service.impl;

import com.example.websocket.dao.GroupMapper;
import com.example.websocket.entity.Group;
import com.example.websocket.service.IGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupServiceImpl implements IGroupService {
    @Autowired
    GroupMapper groupMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return groupMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Group record) {
        return groupMapper.insert(record);
    }

    @Override
    public Group selectByPrimaryKey(Integer id) {
        return groupMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(Group record) {
        return groupMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Group> selectByUserid(int id) {
        return groupMapper.selectByUserid(id);
    }

    @Override
    public List<Group> selectAll() {
        return groupMapper.selectAll();
    }
}
